package com.bdqn.t382.entity;

import java.io.Serializable;

public class Employee implements Serializable {
    private String name;   //姓名
    private int age;   //年龄
    private String post;   //岗位

    public Employee() {

    }

    public Employee(String name, int age, String post) {
        this.name = name;
        this.age = age;
        this.post = post;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", post='" + post + '\'' +
                '}';
    }

    public void print() {
        System.out.println("大家好，我是 " + this.post + "岗位的" + this.name + ", 今年" + this.age + "岁。");
    }
}
